import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Dial鼠标事件")

    Dial {
        id: basicDial
        anchors.centerIn: parent
        width: 200
        height: 200

        from: 0
        to: 100
        value: 0

        onMoved: {
            result.text = "用户交互值变化:" + value
        }

        onPressedChanged: {
            result.text = pressed ? "按下" : "释放"
        }
    }

    Text {
        id: result
        anchors.top: basicDial.bottom
        anchors.horizontalCenter: basicDial.horizontalCenter
        font.pixelSize: 16
    }
}
